package com.code.springboot.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.code.springboot.dto.DishDto;
import com.code.springboot.entity.Dish;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import java.util.List;

@EnableTransactionManagement
public interface DishService extends IService<Dish> {

    //新增菜品，同时插入菜品对应的口味数据，要操作两张表
    public void saveWithFlavor(DishDto dishDto);

    public DishDto getByIdWithFlavor(Long id);


    //更新菜品信息以及口味信息
    public void updateWithFlavor(DishDto dishDto);


    //更换状态
    public void updateStatus(int status, List<Long> ids);

    //删除菜品，要操作两张表
    public void removeWithFlavor(List<Long> ids);

}
